// 父
import React, { Component } from 'react';

import Child1 from "./Child1"; //子组件

class parent extends Component {

  state = { 
    data:"你好我是父，我传给了子",
    list:{
      name:"我是父",
      age:'今年19了'
    }
   }

  render() { 
    return ( 
      <>
        <Child1 data={this.state.data} list={this.state.list}></Child1> {/*传值,传给子组件*/}
      </>
     );
  }
}
 
export default parent;